package cn.com.zhangwoo.microstar.clothing.activity;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import cn.com.microstar.activity.R;
import cn.com.zhangwoo.microstar.adapter.CategoryPagerAdapter;
import cn.com.zhangwoo.microstar.adapter.ClothingDepartmentStoreAdapter;
import cn.com.zhangwoo.microstar.utildb.AppManager;
import cn.com.zhangwoo.microstar.viewpager.fragment.ClothingDepartmentFragment;
/**
 * 服饰百货
 * @author Administrator
 *
 */
public class ClothingDepartmentStoreActivity extends FragmentActivity implements OnClickListener{

	private ListView mListView;
	private TextView mTextViewTitle;
	private ImageView mImageView;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		AppManager.getInstance().addActivity(ClothingDepartmentStoreActivity.this);
		setContentView(R.layout.activity_clothingdepartmentstore);
		initView();
		
	}
	private void initView() {
		// TODO Auto-generated method stub
		findViewById(R.id.signin_actionbar_title_img).setOnClickListener(this);
		mTextViewTitle=(TextView) findViewById(R.id.signin_actionbar_title_text);
		mTextViewTitle.setText("服饰百货");
		mImageView=(ImageView) findViewById(R.id.signin_actionbar_xname_img);
		mImageView.setImageDrawable(getResources().getDrawable(R.drawable.android_arrow_message3));
		mImageView.setOnClickListener(this);
		ViewPager viewPager=(ViewPager) findViewById(R.id.clothingdepartment_viewpager);
		viewPager.setAdapter(new CategoryPagerAdapter(getSupportFragmentManager(),new ClothingDepartmentFragment()));
		mListView=(ListView) findViewById(R.id.clothingdepartment_listView);
		mListView.setAdapter(new ClothingDepartmentStoreAdapter(ClothingDepartmentStoreActivity.this));
	}
	
	private void loadDate() {
		

	}
	
	
	
	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.signin_actionbar_title_img:
			ClothingDepartmentStoreActivity.this.finish();
			break;
		case R.id.signin_actionbar_xname_img:
			
			break;
		default:
			break;
		}
		
	}
}
